Skip to content

Port sphere transport time-varying prescribed velocity fields#365

Draft
cbegeman wants to merge 9 commits intoE3SM-Project:developfrom
cbegeman:omega/port-sphere-transport
Draft

Port sphere transport time-varying prescribed velocity fields#365
cbegeman wants to merge 9 commits intoE3SM-Project:developfrom
cbegeman:omega/port-sphere-transport

Conversation

@cbegeman
Copy link
Copy Markdown

This PR ports time-varying prescribed velocity fields for the sphere transport cases:

and provides an option for the constant prescribed velocity field in the sphere transport case:

Checklist

  • Documentation:
  • Linting
  • Building
    • CMake build does not produce any new warnings from changes in this PR
  • Testing
    • Add a comment to the PR titled Testing with the following:
      • Which machines CTest unit tests
        have been run on and indicate that are all passing.
      • The Polaris omega_pr test suite
        has passed, using the Polaris e3sm_submodules/Omega baseline
      • Document machine(s), compiler(s), and the build path(s) used for -p for both the baseline (Polaris e3sm_submodules/Omega) and the PR build
      • Indicate "All tests passed" or document failing tests
      • Document testing used to verify the changes including any tests that are added/modified/impacted.
      • Performance related PRs: Please include a relevant PACE experiment link documenting performance before and after.
    • New tests:
      • CTest unit tests for new features have been added per the approved design.
      • Polaris tests for new features have been added per the approved design (and included in a test suite)
  • Stealth Features
    • If any stealth features are included in the PR, please confirm that they have been documented.

(Kokkos::pow(sin(lon_p), 2) *
sin(2.0 * LatEdge(IEdge)) *
cos(Pi * TSim / Tau) +
2.0 * Pi * cos(LatEdge(IEdge)));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbegeman
I see in MPAS-Ocean:
u = (1/twelve_days)*(10*(sin(lon_p)**2)*sin(2*lat)*cost + two_pi*coslat)
I think the factor of 10 was moved slightly. Might make a difference in time step stability if the change resulted in a larger velocity.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@overfelt Thanks for pointing that out! I'll fix and retest

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@overfelt That fix seems to have resolved at least the stability issues with the divergent velocity case (top) but not the non-divergent case (bottom). I tried reducing the time step to 1s per km horizontal resolution. Only the rotation_2d has convergence with space and time refinement. Can I delegate the debugging to you?

image image

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbegeman I'll take a look. Maybe I'll get lucky and find a difference with mpas-ocean. Maybe......

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @overfelt!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After this fix and reducing the timestep, the velocity fields for MPAS-O and Omega match.

There is a significant increase in the error levels for Omega (convergence plots pending)

These are the results for the tracer fields with MPAS-O:
image
image
image

And these are the results with Omega:
image
image
image

@cbegeman cbegeman force-pushed the omega/port-sphere-transport branch from 589689d to 852572a Compare April 8, 2026 16:59
Comment on lines +655 to +666
const R8 u = (1.0 / Tau) *
(-5.0 * Kokkos::pow(sin(lon_p / 2), 2) *
sin(2.0 * LatEdge(IEdge)) *
Kokkos::pow(cos(LatEdge(IEdge)), 2) *
cos(Pi * TSim / Tau) +
2.0 * Pi * cos(LatEdge(IEdge)));
const R8 v = ((2.5 / Tau) *
sin(lon_p) *
Kokkos::pow(cos(LatEdge(IEdge)), 3) *
cos(Pi * TSim / Tau));
const R8 normalVel = REarth * (
u * cos(AngleEdge(IEdge)) + v * sin(AngleEdge(IEdge)));
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't been able to track down the reason for the discrepancy between MPAS-O's velocity field (top) and Omega's velocity field (bottom) for the divergent case. I need to pivot to other Omega work so @overfelt any time you have to look into this would be much appreciated!
image
image
image
image

It should be possible to reproduce these results using E3SM-Project/polaris#500. Let me know if you have any trouble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants